<template>
  <div class="dialog" v-if="flag">
    <h3>查看编辑</h3>
    <main><slot></slot></main>
  </div>
</template>
<script>
export default {
  props: {
    flag: Boolean
  },
  name: '',
  data () {
    return {
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
   
  }
}
</script>
<style lang='less'  scoped>
.dialog {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  width: 50vw;
  height: 50vh;
  color: white;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  main {
    flex: 1;
    color: white;
  }
  footer {
    display: flex;
    justify-content: space-between;
  }
}
</style>
